package core.tests;
import junit.framework.TestCase;
import core.models.*;

public class RoadTest extends TestCase
{
	Road road = new Road();
	Places place = Places.Trail;
	
	public void testGetAndSet()
	{
		road.setPlace(place);
		assert(road.getPlace() == place);
	}
	
	public void testUpdatePlaces()
	{
		road.updatePlaces(0);
		assert(road.getPlace() == Places.Trail);
		road.updatePlaces(100);
		assert(road.getPlace() == Places.Store);
		road.updatePlaces(150);
		assert(road.getPlace() == Places.Trail);
		road.updatePlaces(305);
		assert(road.getPlace() == Places.Store);
		road.updatePlaces(350);
		assert(road.getPlace() == Places.Trail);
		road.updatePlaces(505);
		assert(road.getPlace() == Places.River);
		road.updatePlaces(550);
		assert(road.getPlace() == Places.Trail);
		road.updatePlaces(615);
		assert(road.getPlace() == Places.Store);
		road.updatePlaces(750);
		assert(road.getPlace() == Places.Trail);
		road.updatePlaces(901);
		assert(road.getPlace() == Places.Store);
		road.updatePlaces(950);
		assert(road.getPlace() == Places.Trail);
		road.updatePlaces(1207);
		assert(road.getPlace() == Places.Store);
		road.updatePlaces(1225);
		assert(road.getPlace() == Places.Trail);
		road.updatePlaces(1501);
		assert(road.getPlace() == Places.End);
	}

}
